import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'FrontDesk',
    component: ()=>import('../views/front-desk/Index'),
    children: [
      {
        path:'/',
        name:'Home',
        component: ()=>import('../views/front-desk/Home')
      },
      {
        path:'goodsList',
        name:'GoodsList',
        component:()=>import('../views/front-desk/GoodsList')
      },{
        path: 'goodsShow',
        name:'GoodsShow',
        component:()=>import('../views/front-desk/GoodsShow')
      },
      {
        path:'orderDetails',
        name:'OrderDetails',
        component:()=>import('../views/front-desk/OrderDetail')
      }
    ]
  },
  {
    path:'/fdLogin',
    name:'FDLogin',
    component:()=>import('../views/front-desk/Login')
  },
  {
    path: '/backstage',
    name: 'About',
    component: () => import('../views/backstage/Index')
  },
  {
    path: '/test',
    component:()=>import('../views/test/Index'),
    children: [
      {
        path:'/',
        component:()=>import('../views/test/test1')
      }
    ]
  }
]

const router = new VueRouter({
  routes,
  mode:'history'
})

export default router
